import 'element-plus/dist/index.css'

import ElementPlus from 'element-plus'
import { pcRegisterComponents } from '@ny-ui' // 导入组件注册函数
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import i18n, { setElemantLocale } from '@/lang/pc/index' // i18n

import App from './App.vue'
import router from './router/pc/index'

const app = createApp(App)
// 注册所有组件
pcRegisterComponents(app)
// 提供环境变量
app.provide('env', import.meta.env.VITE_ENV)

// 使用i18n
app.use(i18n)
setElemantLocale(app)
app.use(createPinia())
app.use(ElementPlus)
app.use(router)

app.mount('#app')
